﻿@model IList<News>
@{
    Layout = null;
}
<hr style="clear:both;"/>
<h1>Новости</h1>
<div id="mainNewsContainer">
@foreach (News n in Model)
{
    <div class="newsItemContainer">
        <ul class="newsListItem">
		    <li>
			    <div class="newListTitleContainer">@(Html.ActionLink<NewsController>(x => x.View(n.Id), n.Title, new { @class = "newsListItemTitle" }))</div>
		    </li>
		    <li>
			    <div class="newListShortContentContainer">@(Html.ActionLink<NewsController>(x => x.View(n.Id), n.ShortContent, new { @class = "newsListItemShortContent" }))</div>
		    </li>
		    <li>
			    <div class="newsDateCreated">Добавлена: @n.DateCreated.ToString("dd MMMM yyyy")</div>
		    </li>
            @if (n.IsHidden)
            {
			    <li><span class="warning">новость скрыта</span></li>
            }
	    </ul>
        @NewsAvatar.Large(n, imageClass: "news_photo")
    </div>
}
</div>